﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 投票主体
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("投票主体")]
	[BindTable("VoteSubject", Description = "投票主体", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class VoteSubject
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _VoteID;
		/// <summary>
		/// 投票编号
		/// </summary>
		[Description("投票编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "VoteID", "投票编号", "", "int", 10, 0, false)]
		public Int32 VoteID
		{
			get { return _VoteID; }
			set { if (OnPropertyChange("VoteID", value)) _VoteID = value; }
		}

		private String _Type;
		/// <summary>
		/// 类型
		/// </summary>
		[Description("类型")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(3, "Type", "类型", "", "nvarchar(1)", 0, 0, true)]
		public String Type
		{
			get { return _Type; }
			set { if (OnPropertyChange("Type", value)) _Type = value; }
		}

		private String _Subject;
		/// <summary>
		/// 主体
		/// </summary>
		[Description("主体")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(4, "Subject", "主体", "", "nvarchar(100)", 0, 0, true)]
		public String Subject
		{
			get { return _Subject; }
			set { if (OnPropertyChange("Subject", value)) _Subject = value; }
		}

		private Int32 _VoteCatalogID;
		/// <summary>
		/// 投票类别编号
		/// </summary>
		[Description("投票类别编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(5, "VoteCatalogID", "投票类别编号", "", "int", 10, 0, false)]
		public Int32 VoteCatalogID
		{
			get { return _VoteCatalogID; }
			set { if (OnPropertyChange("VoteCatalogID", value)) _VoteCatalogID = value; }
		}

		private Int32 _OrderFlag;
		/// <summary>
		/// 订单标记
		/// </summary>
		[Description("订单标记")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(6, "OrderFlag", "订单标记", "", "int", 10, 0, false)]
		public Int32 OrderFlag
		{
			get { return _OrderFlag; }
			set { if (OnPropertyChange("OrderFlag", value)) _OrderFlag = value; }
		}

		private String _Prop1;
		/// <summary>
		/// 属性1
		/// </summary>
		[Description("属性1")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(7, "Prop1", "属性1", "", "nvarchar(50)", 0, 0, true)]
		public String Prop1
		{
			get { return _Prop1; }
			set { if (OnPropertyChange("Prop1", value)) _Prop1 = value; }
		}

		private String _Prop2;
		/// <summary>
		/// 属性2
		/// </summary>
		[Description("属性2")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(8, "Prop2", "属性2", "", "nvarchar(50)", 0, 0, true)]
		public String Prop2
		{
			get { return _Prop2; }
			set { if (OnPropertyChange("Prop2", value)) _Prop2 = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(9, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(10, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(11, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(12, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "VoteID" : return _VoteID;
					case "Type" : return _Type;
					case "Subject" : return _Subject;
					case "VoteCatalogID" : return _VoteCatalogID;
					case "OrderFlag" : return _OrderFlag;
					case "Prop1" : return _Prop1;
					case "Prop2" : return _Prop2;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "VoteID" : _VoteID = Convert.ToInt32(value); break;
					case "Type" : _Type = Convert.ToString(value); break;
					case "Subject" : _Subject = Convert.ToString(value); break;
					case "VoteCatalogID" : _VoteCatalogID = Convert.ToInt32(value); break;
					case "OrderFlag" : _OrderFlag = Convert.ToInt32(value); break;
					case "Prop1" : _Prop1 = Convert.ToString(value); break;
					case "Prop2" : _Prop2 = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得投票主体字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 投票编号
			///</summary>
			public const String VoteID = "VoteID";

			///<summary>
			/// 类型
			///</summary>
			public const String Type = "Type";

			///<summary>
			/// 主体
			///</summary>
			public const String Subject = "Subject";

			///<summary>
			/// 投票类别编号
			///</summary>
			public const String VoteCatalogID = "VoteCatalogID";

			///<summary>
			/// 订单标记
			///</summary>
			public const String OrderFlag = "OrderFlag";

			///<summary>
			/// 属性1
			///</summary>
			public const String Prop1 = "Prop1";

			///<summary>
			/// 属性2
			///</summary>
			public const String Prop2 = "Prop2";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}